<?php
/**
 * Created by PhpStorm.
 * User: 图图
 * Date: 2021-1-4
 * Time: 14:02
 */

namespace app\manage\validate;
use think\Validate;
/**
 * 行为验证器
 * @package app\menus\validate
 * @author
 */
class Sku extends Validate
{
    //定义验证规则
    protected $rule = [
        'sku_name|规格名称' => 'require',
        'sku_price|规格价' => 'require',
        'sku_img|规格主图' => 'require',
        'stock|库存' => 'require',

    ];
//    //定义验证场景
//    protected $scene = [
//        'add'   =>  ['goods_name','goods_price','goods_img','goods_attr','catid','order'],
//        'edit'  =>  ['goods_name','goods_price','goods_img','goods_attr','catid','order'],//更新
//    ];
}
